function jackknife

r_onset_frames_ori = r_onset_frames;
r_onset_frames = r_onset_frames_ori;


for xnd = 1:length(r_onset_frames)-1
    for knd = 1:length(r_onset_frames_ori)
        for ind=1:length(r_onset_frames)-knd+1
            r_trig_act(1:length(sel_x),1:length(sel_y),ind)=mean(vdata(sel_x,sel_y,r_onset_frames+1:r_onset_frames+win),3)-mean(vdata(sel_x,sel_y,r_onset_frames-win:r_onset_frames-1),3);
        end
        jbmean(knd)=mean(mean(mean(r_trig_act))); 
        r_onset_frames = r_onset_frames_ori;
    end
end

r_trig_act=[];
jbmean = []
knd=2
